home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / FFT / SINCOS.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-01-17  |  1.2 KB  |  43 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Sine-Cosine Table Generator for FFTs. 
  6. ; Last Update 25 Nov 86   Version 1.2
  7. ;
  8. sincos  macro   points,coef
  9. sincos  ident   1,2
  10. ;
  11. ;       sincos  -       macro to generate sine and cosine coefficient
  12. ;                       lookup tables for Decimation in Time FFT
  13. ;                       twiddle factors.
  14. ;
  15. ;       points  -       number of points (2 - 32768, power of 2)
  16. ;       coef    -       base address of sine/cosine table
  17. ;                       negative cosine value in X memory
  18. ;                       negative sine value in Y memory
  19. ;
  20. ; Latest revision - 25-Nov-86
  21. ;
  22.  
  23. pi      equ     3.141592654
  24. freq    equ     2.0*pi/@cvf(points)
  25.  
  26.         org     x:coef
  27. count   set     0
  28.         dup     points/2
  29.         dc      -@cos(@cvf(count)*freq)
  30. count   set     count+1
  31.         endm
  32.  
  33.         org     y:coef
  34. count   set     0
  35.         dup     points/2
  36.         dc      -@sin(@cvf(count)*freq)
  37. count   set     count+1
  38.         endm
  39.  
  40.         endm    ;end of sincos macro
  41.